/**顶部nav条 */
import React from 'react';
import './index.less';
import CButton from '../notLogin/index';
import CDrawer from '../logined/index';

const Nav = () => {
  return (
    <div className="nav">
      <div className="logo_wrap"></div>
      <div className="loginOrMenu">
        {/* 有cookie，就显示小鸟组件，没cookie，就显示登陆注册按钮 */}
        {document.cookie.length > 0 && document.cookie.indexOf('userId') !== -1 ? <CDrawer /> : <CButton />}
      </div>
    </div> 
  )
}

export default Nav;